import { Component, Input, OnInit, SimpleChanges } from '@angular/core';

@Component({
  selector: 'app-modal-progress-content',
  templateUrl: './modal-progress-content.component.html',
  styleUrls: ['./modal-progress-content.component.less']
})
export class ModalProgressContentComponent implements OnInit {
  @Input() percent: number = 0;
  constructor() { }

  ngOnInit(): void {
    console.log('ngOnInit called');
  }

  ngOnChanges(changes: SimpleChanges): void {
    console.log('ngOnChanges called');
    if (changes['percent']) {
      console.log('percent 变化了:', changes['percent'].currentValue);
      // 这里可以处理当 percent 变化时的逻辑
    }
  }

}
